package lancs.mobilemedia.core.ui.controller.commands;

import javax.microedition.lcdui.Display;

import lancs.mobilemedia.core.ui.controller.AbstractController;
import lancs.mobilemedia.core.ui.controller.ControllerCommand;
import lancs.mobilemedia.core.ui.controller.PhotoViewController;
import lancs.mobilemedia.core.ui.screens.AddPhotoToAlbum;

public class CopyPhoto implements ControllerCommand {

	public boolean execute(AbstractController controller) {
		AddPhotoToAlbum copyPhotoToAlbum = new AddPhotoToAlbum("Copy Photo to Album");
		copyPhotoToAlbum.setPhotoName(((PhotoViewController) controller).getImageName());
		copyPhotoToAlbum.setLabePhotoPath("Copy to Album:");
		copyPhotoToAlbum.setCommandListener(controller);
		Display.getDisplay(controller.getMidlet()).setCurrent(copyPhotoToAlbum);

		return true;
	}
}